home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000166_icon-group-sender _Tue Jul 30 08:34:09 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 30 Jul 1996 14:20:04 MST
  2. Date: Tue, 30 Jul 1996 08:34:09 -0700
  3. From: kwalker@orville.premenos.com (Ken Walker)
  4. Message-Id: <199607301534.IAA07013@varda.premenos.com>
  5. To: icon-group@cs.arizona.edu, H.Lawson@tees.ac.uk
  6. Subject: Re: Optional expressions
  7. Mime-Version: 1.0
  8. Content-Type: text/plain; charset=us-ascii
  9. Content-Transfer-Encoding: 7bit
  10. Content-Md5: T/Q2/7fIM5nixKZOQBDrFA==
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12. Status: O
  13.  
  14. > Date: Mon, 29 Jul 1996 15:54:02 +0100
  15. > From: Hamish Lawson <H.Lawson@tees.ac.uk>
  16. > What is the Icon idiom for making one of a series of conjoined
  17. > expressions optional? Let's say I have the following series of
  18. > expressions
  19. >    e1 & e2 & e3 & e4
  20. > and I want e3 to be evaluated if possible but not to cause the failure
  21. > of the enclosing expression. 
  22.  
  23. You can do 
  24.  
  25.     e1 & e2 & (e3; e4)
  26.     
  27. e3 is evaluated but regardless of whether is succeeds or fails, e4 is
  28. always evaluated and e4 determines whether (e3; e4) succeeds or fails.
  29.  
  30.  
  31. Ken Walker, kwalker@premenos.com
  32. Premenos Coporation, Concord, Ca. 94520
  33.  
  34.